/*
 * igo: com.cctv.igo.admin.scheduler.common.DefaultTaskParser.java Create On 2011-5-3 下午10:39:45 By Q-Wang
 * $Revision: 1.1 $
 */
package com.ctvit.scheduler.parser;

import org.quartz.JobDetail;

import com.ctvit.scheduler.domain.QrtxTask;

/**
 * @author <a href="mailto:apeidou@gmail.com">Q-Wang</a>
 *
 */
public class DefaultTaskParser implements TaskParser {

	/**
	 * @see com.ctvit.scheduler.parser.TaskParser#parse(QrtxTask)
	 */
	@Override
	public JobDetail parse(QrtxTask task) {
		try {
			return new JobDetail(task.getName(),Class.forName(task.getDefinition()));
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		return null;
	}

}
